package arrays


func Contains(array []int, item int) bool {
	for _, v := range array {
		if v == item {
			return true
		}
	}
	return false
}

func IndexOf(array []interface{}, item interface{}) int {
	for i, v := range array {
		if v == item {
			return i
		}
	}
	return -1
}

func Remove(array []int, item int) int {
	for i, v := range array {
		if v == item {
			array = append(array[0 :i], array[i + 1:]...)
		}
	}

	return nil
}

func RemoveAll(array , items []int) {
	for _, item := range items {
		for i, v := range array {
			if v == item {
				array = append(array[0 :i], array[i + 1:]...)
				break
			}
		}
	}
}